import { createRouter, createWebHistory } from "vue-router";

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      redirect: "/home",
    },
    {
      path: "/login",
      component: () => import("../pages/login/index.vue"),
    },
    {
      path: "/home",
      component: () => import("../pages/home/index.vue"),
      children: [
        {
          path: "/home",
          redirect: "/home/index",
        },
        {
          path: "/home/index",
          component: () => import("../pages/home/index/index.vue"),
        },
        {
          path: "/home/kaidan",
          component: () => import("../pages/home/kaidan/index.vue"),
        },
        {
          path: "/home/pos-list",
          component: () => import("../pages/home/pos-list/index.vue"),
        },
        {
          path: "/home/member",
          component: () => import("../pages/home/member/index.vue"),
        },
        {
          path: "/home/newmember",
          component: () => import("../pages/home/newmember/index.vue"),
        },
        {
          path: "/home/noVip",
          component: () => import("../pages/home/noVip/index.vue"),
        },
          {path:"/home/kaoqin",
          component:()=>import("../pages/home/kaoqin/index.vue"),
        },
        {
          path: "/home/kaoqin",
          component: () => import("../pages/home/kaoqin/index.vue"),
        },
        {
          path: "/home/kaoQinMine",
          component: () => import("../pages/home/kaoQinMine/index.vue"),
        },
        {
          path: "/home/class",
          component: () => import("../pages/home/class/index.vue"),
        },
        {
          path: "/home/sheZhi",
          component: () => import("../pages/home/sheZhi/index.vue"),
        },
      ],
    },
    {
      path: "/:pathMatch(.*)*",
      component: () => import("../pages/notFound/index.vue"),
    },
  ],
});

export default router;
